﻿@using System.Globalization
@model CultuRAM.Models.Event

@{
    var places = ViewBag.Places;
}

<div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 id="myModalLabel">
            @Model.Title
        </h4>
    </div>
    <div class="modal-body" style="">
        <div class="tabbable" id="tabsEvent">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#tab1" data-toggle="tab"><i class="fa fa-align-justify"></i> Dados Gerais</a>
                </li>
                <li>
                    <a href="#tab2" data-toggle="tab"><i class="fa fa-list"></i> Propriedades</a>
                </li>
                <li>
                    <a href="#tab3" data-toggle="tab"><i class="fa fa-map-marker"></i> Local</a>
                </li>
                <li>
                    <a href="#tab4" data-toggle="tab"><i class="fa fa-comment"></i> Comentários</a>
                </li>
            </ul>
            <div class="tab-content">
                <!-- ------------- GENERAL DATA ------------- -->
                <div class="tab-pane active" id="tab1">
                    <table>
                        <tr>
                            <td style="vertical-align: top;">
                                <img alt="Cartaz" class="thumbnail" style="width: 200px;" src="@Model.Poster"/>
                            </td>
                            <td style="padding-left: 20px; line-height: 28px; vertical-align: top;">
                                <b>@Html.DisplayNameFor(model => model.EventType.Type):</b> <span style="color: brown">@Model.EventType.Type </span><br/>
                                <b>@Html.DisplayNameFor(model => model.Title):</b> @Model.Title <br/>
                                <b>Data/Hora de Início:</b> @Model.StartDate.ToString("dd", CultureInfo.CurrentCulture) de @Model.StartDate.ToString("MMMM", CultureInfo.CurrentCulture) de @Model.StartDate.Year às @Model.StartDate.ToString("HH:mm") <br/>
                                <b>Data/Hora de Fim:</b> @Model.EndDate.ToString("dd", CultureInfo.CurrentCulture) de @Model.EndDate.ToString("MMMM", CultureInfo.CurrentCulture) de @Model.EndDate.Year às @Model.EndDate.ToString("HH:mm") <br/>
                                
                                @if(Model.Duration != null)
                                {
                                    <b>@Html.DisplayNameFor(model => model.Duration):</b> @Model.Duration<br/>
                                }
                               
                                 <b>Entidade Promotora:</b> @Model.Entity.Name <br/>
                               
                                @{
                                    var vv = @Model.GetPropertyValue("Local");
                                 }
                                
                                @if (String.IsNullOrEmpty(vv))
                                {
                                    <b>Local: </b>
                                    @vv
                                }
                                                  
                            </td>
                        </tr>
                    </table>
                </div>
                <!-- ------------- PROPERTIES ------------- -->
                <div class="tab-pane" id="tab2">
                    @if (Model.PropertyValuesPaged == null || !Model.PropertyValuesPaged.Any())
                        {
                            <div class="alert alert-warning" style="margin-top: 10px">
                                Este evento não tem Propriedades definidas!
                            </div>               
                        }
                        else
                        {
                            @Html.Partial("~/Views/EventPropertyValues/_Index.cshtml", Model.PropertyValuesPaged)
                        }

                </div>
                <!-- ------------- LOCATION ------------- -->
                <div class="tab-pane" id="tab3">



                </div>
                <!-- ------------- COMMENTS ------------- -->
                <div class="tab-pane" id="tab4">
                    <p>
                        Comentários...
                    </p>
                </div>
            </div>
        </div> <!-- /tabbable -->
    </div> <!-- /model-body -->
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true"><i class="icon-remove-circle"></i> Fechar</button>
    </div>